package createdFurnituries;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import furnitureBuilder.Bedroom;
public class RoomList {
	public static List<Bedroom> rooms = new ArrayList<Bedroom>();
	public static HashMap<String, Bedroom> createdRooms = new HashMap<String, Bedroom>();
	
	/**
	 * Add new created bedroom
	 * @param name
	 * @param room
	 */
	public static void addRoom(String name, Bedroom room){
		rooms.add(room);
	}
	
	/**
	 * Add the room with lumber type
	 * @param room
	 */
	public static void addRoomWithType(Bedroom room) {
		createdRooms.put(room.bedroomLumberType, room);
	}
	
	/**
	 * Get room searched for the type of lumber
	 * @param roomLumberType
	 * @return
	 */
	public static Bedroom getSpecificLumberTypeRoom(String roomLumberType) {
		if(createdRooms.containsKey(roomLumberType)) {
			return createdRooms.get(roomLumberType);
		}
		return null; 
	}
}
